﻿using InnoWeb.CEND.Core.Model.Page;
using InnoWeb.CEND.Data.Mapping.BaseMapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InnoWeb.CEND.Data.Mapping.Page
{
    public class PageItemMapping : BaseMappingConfiguration<PageItem, int>
    {
        public PageItemMapping()
        {
            this.Property(a => a.Name).IsRequired().HasMaxLength(100);
            this.Property(a => a.NameTR).IsRequired().HasMaxLength(100);

            this.HasMany(a => a.PageContents).WithRequired(a => a.PageItem);
            //this.HasRequired(a => a.Category).WithRequiredPrincipal();
        }
    }
}
